#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;

int main()
{
    int n = 0;
    cin >> n;
    unordered_map<int, int> m;
    for (int i = 0;i < n;i++)
    {
        string s;
        cin >> s;
        int count = 0;
        for (auto& a : s)
        {
            count += a;
        }
        m[count] = 1;
    }
    cout << m.size() << endl;
    return 0;
}
